import { createStore } from 'vuex';

export default createStore({
    state: {
        token: '',
        pageSize: 20,

    },
    getters: {
        getToken: state => state.token,
        getPageSize: state => state.pageSize,
    },
    mutations: {
        setToken:(state,token)=>{
            state.token = token
            localStorage.setItem("token",token)
        },
        setPageSize:(state,pageSize)=>{
            state.pageSize = pageSize
        },
    },
});